﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WcfService
{
    [ServiceContract(Namespace = "ywt.WcfTest", SessionMode = SessionMode.Required)]
    public interface IUserService
    {
        [OperationContract]
        string Login(string username, string password);

        [OperationContract]
        void LogOut();

        [OperationContract]
        void Register(UserRegisterModel user);
    }

    [DataContract]
    public class UserRegisterModel
    {
        [DataMember]
        public string UserName { get; set; }
        [DataMember]
        public string RealName { get; set; }
        [DataMember]
        public string Password { get; set; }
        [DataMember]
        public string Group { get; set; }
        [DataMember]
        public string Email { get; set; }
    }
}
